package com.qf.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * IntelliJ IDEA -> springboot120622
 * 2019/12/7 11:48
 *
 * @author zmyao
 * 别看，我是渣渣。
 */
@Configuration
public class InterceptorUtil extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //添加两个拦截器   ，他们执行的顺序是按照  ，添加的先后  ，执行的
       registry.addInterceptor(new InterceptorA()).addPathPatterns("/findusers");
       registry.addInterceptor(new InterceptorB()).addPathPatterns("/findusers");


    }
}
